package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysAppBookinfoMapper;
import com.ruoyi.system.domain.SysAppBookinfo;
import com.ruoyi.system.service.ISysAppBookinfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 书籍信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-09-06
 */
@Service
public class SysAppBookinfoServiceImpl implements ISysAppBookinfoService 
{
    @Autowired
    private SysAppBookinfoMapper sysAppBookinfoMapper;

    /**
     * 查询书籍信息
     * 
     * @param id 书籍信息ID
     * @return 书籍信息
     */
    @Override
    public SysAppBookinfo selectSysAppBookinfoById(Long id)
    {
        return sysAppBookinfoMapper.selectSysAppBookinfoById(id);
    }

    /**
     * 查询书籍信息列表
     * 
     * @param sysAppBookinfo 书籍信息
     * @return 书籍信息
     */
    @Override
    public List<SysAppBookinfo> selectSysAppBookinfoList(SysAppBookinfo sysAppBookinfo)
    {
        return sysAppBookinfoMapper.selectSysAppBookinfoList(sysAppBookinfo);
    }

    /**
     * 新增书籍信息
     * 
     * @param sysAppBookinfo 书籍信息
     * @return 结果
     */
    @Override
    public int insertSysAppBookinfo(SysAppBookinfo sysAppBookinfo)
    {
        sysAppBookinfo.setCreateTime(DateUtils.getNowDate());
        return sysAppBookinfoMapper.insertSysAppBookinfo(sysAppBookinfo);
    }

    /**
     * 修改书籍信息
     * 
     * @param sysAppBookinfo 书籍信息
     * @return 结果
     */
    @Override
    public int updateSysAppBookinfo(SysAppBookinfo sysAppBookinfo)
    {
        return sysAppBookinfoMapper.updateSysAppBookinfo(sysAppBookinfo);
    }

    /**
     * 删除书籍信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysAppBookinfoByIds(String ids)
    {
        return sysAppBookinfoMapper.deleteSysAppBookinfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除书籍信息信息
     * 
     * @param id 书籍信息ID
     * @return 结果
     */
    @Override
    public int deleteSysAppBookinfoById(Long id)
    {
        return sysAppBookinfoMapper.deleteSysAppBookinfoById(id);
    }
}
